Package client.teavm


package client.teavm
TeaVM-specific integration layer for JSIDPlay2.

This package provides the glue code between the Java-side emulator logic and the JavaScript environment generated by TeaVM. It contains classes responsible for:

  • Bridging between Java and JavaScript using @JSBody and @Import annotations.
  • Managing WebAssembly and JavaScript interoperability (e.g. transferring audio and video buffers to the browser runtime).
  • Implementing browser-specific functionality like WebAudio sample conversion, pixel buffer handling, and asynchronous communication with the main thread or Web Workers.

The goal of this package is to isolate all browser- and TeaVM-dependent code, so that the rest of the emulator remains platform-agnostic and testable in a pure Java environment.

Structure

  • ImportedApi — Implements IImportedApi and bridges emulator events (samples, pixels, printer output, etc.) to JavaScript functions.
  • AudioDriverTeaVM — Audio output implementation optimized for TeaVM with audio buffers.
  • PALEmulationTeaVM — Video output implementation optimized for TeaVM with RGBA pixel buffers.
  • client.teavm.common — Shared classes and interfaces used by both the TeaVM JavaScript and WebAssembly builds.
Autor:
Ken Händel